<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>学习模板语法</h1>
    <hr/>
    <div>{{ n1 }}</div>
    <hr/>
    <div>
        {% for item in n2 %}
            <li>{{ item }}</li>
        {% endfor %}
    </div>
    <hr/>
    <div>
        {{ n3.name }}
        {{ n3.salary }}
        {{ n3.position }}
        <ul>
            {% for item in n3.keys %}
                <li>{{ item }}</li>
            {% endfor %}
        <hr/>
            {% for item in n3.values %}
                <li>{{ item }}</li>
            {% endfor %}
        <hr/>
            {% for item in n3.items %}
                <li>{{ item }}</li>
            {% endfor %}
        <hr/>
            {% for k,v in n3.items %}
                <li>{{ k }}={{ v }}</li>
            {% endfor %}
        <hr/>
        </ul>
    </div>
    <hr/>
    <div>
        {{ n4.0 }}
        <br/>
        {{ n4.0.name }}
        <br/>
        {{ n4.0.salary }}
    </div>
    <hr/>
    <div>
        姓名|薪资
        {% for item in n4 %}
            <div>{{ item.name }}|{{ item.salary }}</div>
        {% endfor %}
    </div>
    <hr/>
    <div>
        {% if n1 == "代码骑士" %}
            <h2>Hello!</h2>
        {% elif n1 == "代码超人" %}
            <h2>Hi!</h2>
        {% else %}
            <h3>你找错人了。</h3>
        {% endif %}
    </div>
</body>
</html>